const express = require('express');
const handler = require('./handler');

const router = express.Router();



router.get('/', (req, res) => {
    res.redirect('/index.html');
});

router.get('/index.html', (req, res) => {



    handler.showIndex(req, res);

});

router.use('/details', (req, res) => {



    handler.showDetails(req, res);

});

router.use('/submit', (req, res) => {


    handler.showSubmit(req, res);
});

router.post('/add', (req, res) => {



    handler.add(req, res);

});

router.use('/delete', (req, res) => {


    handler.delte(req, res);

});

module.exports = router;